home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssseeeemmmm____mmmmooooddddeeee((((3333CCCC)))) sssseeeemmmm____mmmmooooddddeeee((((3333CCCC))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ssss_eeee_mmmm______mmmm_oooo_dddd_eeee - set the operation mode of a POSIX unnamed semaphore
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_eeee_mmmm_aaaa_pppp_hhhh_oooo_rrrr_eeee_...._hhhh_>>>>
- _iiii_nnnn_tttt _ssss_eeee_mmmm______mmmm_oooo_dddd_eeee _((((_ssss_eeee_mmmm______tttt _****_s_e_m_,,,, _iiii_nnnn_tttt _c_m_d_[[[[_,,,, _a_r_g_]]]]_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _ssss_eeee_mmmm______mmmm_oooo_dddd_eeee is used to change the operation mode of the specified POSIX
- unnamed semaphore _s_e_m. Changing a semaphore's default operation mode
- allows applications to enable two levels of debug tracing, and apply
- retry spinning.
-
- Semaphore types other than POSIX unnamed semaphores are not supported by
- this function.
-
- _ssss_eeee_mmmm______mmmm_oooo_dddd_eeee is an IRIX extension to the POSIX interfaces and is not part of
- the IEEE 1003.1b Standard.
-
- The operation mode is selected by setting _c_m_d to one of the following:
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______TTTT_RRRR_AAAA_CCCC_EEEE_IIII_NNNN_IIII_TTTT
- Initialize statistical tracing for _s_e_m, passing a pointer to a
- user-allocated trace structure of type _ssss_eeee_mmmm______tttt_rrrr_aaaa_cccc_eeee______tttt as _a_r_g. When
- debug or meter tracing is enabled, the collected data is stored in
- the trace structure. Upon initialization, the contents of the
- structure is cleared.
-
- The trace structure must reside in memory accessible to all
- threads/processes accessing _s_e_m, to allow them to update the traced
- data. If the semaphore is being shared across process boundarys,
- the trace structure must be located at the same virtual address for
- all processes.
-
- The application may access the contents of the trace structure at
- any time.
-
- Note: Tracing is not supported for _nnnn_oooo_nnnn_----_ssss_hhhh_aaaa_rrrr_eeee_dddd unnamed semaphores,
- used by pthread applications.
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______MMMM_EEEE_TTTT_EEEE_RRRR_OOOO_NNNN
- Enable metered tracing for _s_e_m. Once a trace structure for _s_e_m has
- been initialized, metered tracing can be enabled. Enabling this
- level of tracing causes metered information to be accumulated and
- stored in the following trace structure fields (as operations
- occur):
-
- _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt_ssss: number of sem_wait operations
-
- _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt_hhhh_iiii_tttt_ssss: number of times a thread/process called _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt
- without having to block
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssseeeemmmm____mmmmooooddddeeee((((3333CCCC)))) sssseeeemmmm____mmmmooooddddeeee((((3333CCCC))))
-
-
-
- _ssss_eeee_mmmm______pppp_oooo_ssss_tttt_ssss: number of sem_post operations
-
- _ssss_eeee_mmmm______pppp_oooo_ssss_tttt_hhhh_iiii_tttt_ssss: number of times a thread/process called _ssss_eeee_mmmm______pppp_oooo_ssss_tttt
- without having to wakeup a waiting thread/process
-
- _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt_eeee_rrrr_ssss: number of threads/processes currently waiting on
- the semaphore
-
- _ssss_eeee_mmmm______mmmm_aaaa_xxxx_wwww_aaaa_iiii_tttt_eeee_rrrr_ssss: maximum number of threads/processes that can
- block on a semaphore at any given time
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______MMMM_EEEE_TTTT_EEEE_RRRR_OOOO_FFFF_FFFF
- Disable metered tracing for _s_e_m, leaving the contents of the trace
- structure intact for future analysis.
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______MMMM_EEEE_TTTT_EEEE_RRRR_RRRR_EEEE_SSSS_EEEE_TTTT
- Clear the metered contents of the trace structure of semaphore _s_e_m.
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______DDDD_EEEE_BBBB_UUUU_GGGG_OOOO_NNNN
- Enable debug tracing for _s_e_m. Once a trace structure for _s_e_m has
- been initialized, debug tracing can be enabled. Enabling this level
- of tracing causes ownership and access information to be tracked and
- stored in the following trace structure fields:
-
- _ssss_eeee_mmmm______oooo_wwww_nnnn_eeee_rrrr______pppp_iiii_dddd: process ID of the semaphore's current owner
-
- _ssss_eeee_mmmm______oooo_wwww_nnnn_eeee_rrrr______tttt_iiii_dddd: pthread ID of the semaphore's current owner
-
- _ssss_eeee_mmmm______oooo_wwww_nnnn_eeee_rrrr______pppp_cccc: program counter of the semaphore owner
-
- _ssss_eeee_mmmm______llll_aaaa_ssss_tttt______pppp_iiii_dddd: process ID of the last process to perform a
- semaphore operation on _s_e_m
-
- _ssss_eeee_mmmm______llll_aaaa_ssss_tttt______tttt_iiii_dddd: pthread ID of the last pthread to perform a
- semaphore operation on _s_e_m
-
- _ssss_eeee_mmmm______llll_aaaa_ssss_tttt______pppp_cccc: program counter of the last thread/process to to
- perform a semaphore operation on _s_e_m
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______DDDD_EEEE_BBBB_UUUU_GGGG_OOOO_FFFF_FFFF
- Disable debug tracing for _s_e_m, leaving the contents of the trace
- structure intact for future analysis.
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______DDDD_EEEE_BBBB_UUUU_GGGG_RRRR_EEEE_SSSS_EEEE_TTTT
- Clear the debug ownership contents of the trace structure of
- semaphore _s_e_m.
-
- _SSSS_EEEE_MMMM______MMMM_OOOO_DDDD_EEEE______SSSS_PPPP_IIII_NNNN_SSSS_EEEE_TTTT
- Apply a retry count _a_r_g to hold-off blocking in _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt(3C) when
- the semaphore _s_e_m is not immediately available. The default POSIX
- semaphore _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt algorithm attempts to acquire a semaphore once,
- and blocks the caller if the semaphore isn't available. Applying a
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- sssseeeemmmm____mmmmooooddddeeee((((3333CCCC)))) sssseeeemmmm____mmmmooooddddeeee((((3333CCCC))))
-
-
-
- retry count causes _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt to retry semaphore acquisition _a_r_g times
- (spinning) before blocking. Retry counts remain in effect until the
- application again sets the retry count to 0.
-
- Note: This operation mode is ignored on uni-processor systems.
-
- _ssss_eeee_mmmm______mmmm_oooo_dddd_eeee will fail if the following is true:
-
- [EINVAL] Invalid parameter.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _ssss_eeee_mmmm______iiii_nnnn_iiii_tttt(3C), _ssss_eeee_mmmm______pppp_oooo_ssss_tttt(3C), _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt(3C), _ssss_eeee_mmmm______pppp_rrrr_iiii_nnnn_tttt(3C)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion, a value of 0 is returned to the calling
- process. Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
- indicate the error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-